package com.yida.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yida.system.api.domain.SysUserUkey;

/**
 * 用户与Ukey关联Mapper接口
 * 
 * @author ruoyi
 * @date 2023-04-17
 */
public interface SysUserUkeyMapper {

    /**
     * 根据用户名和状态查询ukey信息
     * 
     * @param id 用户与Ukey关联主键
     * @return 用户与Ukey关联
     */
    public SysUserUkey selectSysUserUkeyByUserName(@Param("userName") String userName, @Param("status") Integer status);

    /**
     * 根据用户名、UkeyId、状态查询ukey信息
     * 
     * @param id 用户与Ukey关联主键
     * @return 用户与Ukey关联
     */
    public SysUserUkey selectSysUserUkeyByUserNameAndUkeyId(@Param("userName") String userName, @Param("ukeyId") String ukeyId, @Param("status") int status);

    /**
     * 查询用户与Ukey关联
     * 
     * @param id 用户与Ukey关联主键
     * @return 用户与Ukey关联
     */
    public SysUserUkey selectSysUserUkeyById(Long id);

    /**
     * 根据用户ID查询用户与Ukey关联
     * 
     * @param id 用户与Ukey关联主键
     * @return 用户与Ukey关联
     */
    public SysUserUkey selectSysUserUkeyByUserId(@Param("userId") Long userId, @Param("status") Integer status);

    /**
     * 查询用户与Ukey关联列表
     * 
     * @param sysUserUkey 用户与Ukey关联
     * @return 用户与Ukey关联集合
     */
    public List<SysUserUkey> selectSysUserUkeyList(SysUserUkey sysUserUkey);

    /**
     * 查询用户与Ukey关联列表不带key信息
     * 
     * @param sysUserUkey 用户与Ukey关联
     * @return 用户与Ukey关联集合
     */
    public List<SysUserUkey> selectSysUserUkeyListNoKeyInfo(SysUserUkey sysUserUkey);

    /**
     * 新增用户与Ukey关联
     * 
     * @param sysUserUkey 用户与Ukey关联
     * @return 结果
     */
    public int insertSysUserUkey(SysUserUkey sysUserUkey);

    /**
     * 修改用户与Ukey关联
     * 
     * @param sysUserUkey 用户与Ukey关联
     * @return 结果
     */
    public int updateSysUserUkey(SysUserUkey sysUserUkey);

    /**
     * 解除ukey绑定
     * 
     * @param sysUserUkey
     * @return
     */
    public int unbindingUkey(Long id);

    /**
     * 切换状态
     * 
     * @param sysUserUkey
     * @return
     */
    public int changeUkeyStatus(SysUserUkey sysUserUkey);

    /**
     * 删除用户与Ukey关联
     * 
     * @param id 用户与Ukey关联主键
     * @return 结果
     */
    public int deleteSysUserUkeyById(Long id);

    /**
     * 删除用户与Ukey关联
     * 
     * @param id 用户与Ukey关联主键
     * @return 结果
     */
    public int deleteSysUserUkeyByUserId(Long userId);

    /**
     * 批量删除用户与Ukey关联
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysUserUkeyByIds(Long[] ids);
}
